package ru.fadeev.crammer.data;


/**
 * Phrase class represents Phrase entity. Phrase is a piece of text 
 * constisting of several words.
 * Phrase is used for Gaps Filling Test where user should match words and
 * phrases containing these words with words replaced by dots. 
 * @author Konstantin Fadeyev
 *
 */
public class Phrase {
	// Constants
	public static final int NO_CHANGE = 0;
	public static final int UPDATED = 1;
	public static final int INSERTED = 2;
	
	// User fields
	private String text;
	private int id;
	private int status;
	
	
	public Phrase(int id, String phraseText) {
		this.id = id;
		this.text = phraseText;
		status = NO_CHANGE;
	}
	
	public Phrase(int id, String phraseText, int status) {
		this.id = id;
		this.text = phraseText;
		this.status = status;
	}

	/**
	 * @return the text
	 */
	public String getText() {
		return text;
	}

	/**
	 * @param text the text to set
	 */
	public void setText(String text) {
		this.text = text;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	protected void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the status
	 */
	public int getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(int status) {
		this.status = status;
	}

}
